package topcoder;

public class CompositeSmash {
	
	private boolean _thePossible(int n, int t){
		if(n<4)
			return false;
		
		boolean seen = false;
		for(int i=2; i <= n/2; i++){
			if(n%i == 0){
				if(i==t || n/i==t)
					seen = true;
				else if(!_thePossible(i, t) && !_thePossible(n/i, t))
					return false;
			}
		}
		
		return seen;
	}
		
	public String thePossible(int n, int t){
		if(n==t)
			return "Yes";
		if(t>n/2)
			return "No";
		if(_thePossible(n, t))
			return "Yes";
		else
			return "No";
	}
	
	public static void main(String[] args) {
		CompositeSmash t = new CompositeSmash();
		t.thePossible(12, 6);
	}
}
